<?php
namespace Home\Controller;
use Think\Controller;
class ProtocolController extends Controller{
    public function getPro(){
        $cate_id=isset($_POST['cate_id'])?trim($_POST['cate_id']):null;
        if(empty($cate_id)){
            $requset=array('returnCode'=>997,'returnMsg'=>'所请求的是空数据','returnData'=>null);
            echo json_encode($requset); exit;
        }else{
            $result=M('adsmanage')->where(['cat_id'=>$cate_id])->field('protocol')->find();
            if(empty($result)){
                $requset=array('returnCode'=>999,'returnMsg'=>'空数据','returnData'=>null);
                echo json_encode($requset); exit;
            }else{
                $requset=array('returnCode'=>0,'returnMsg'=>'返回成功','returnData'=>$result);
                echo json_encode($requset); exit;
            }
        }
    }
}